<%@ Page Language="C#" AutoEventWireup="true" Inherits="Documentation_Others_Resources" Codebehind="Resources.aspx.cs" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link href="../../Css/Layout.css" rel="stylesheet" type="text/css"/>      
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <span class="title">Resources</span>
    <br/>
    <br/>
    Javascript files, images and styles used in the GUI are built in the dll's. 
    In order to allow the framework to load this files there are a few things to configure.
    <br/>
    <br/>
    <br/>
    
    <span class="subtitle">HTTP Handlers</span>
    <br/>
    <br/>
    Using custom HTTP handlers, the framework can redirect a call from the client side in order to get any file in the resources.
    Copying the following tags in the web.config, custom HTTP Handlers are activated:

<pre class="codeBlock">
&lt;httpHandlers&gt;
	&lt;add verb="POST,GET" path="Pampa.*/*.css" type="Pampa.Common.HTTPHandlers.StyleHandler, Pampa.Common"/&gt;
	&lt;add verb="POST,GET" path="Pampa.*/*.gif" type="Pampa.Common.HTTPHandlers.MediaHandler, Pampa.Common"/&gt;
	&lt;add verb="POST,GET" path="Pampa.*/*.png" type="Pampa.Common.HTTPHandlers.MediaHandler, Pampa.Common"/&gt;
	&lt;add verb="POST,GET" path="Pampa.*/*.js" type="Pampa.Common.HTTPHandlers.JSHandler, Pampa.Common"/&gt;
	&lt;add verb="POST,GET" path="Pampa.*/*.xsd" type="Pampa.Common.HTTPHandlers.SchemaHandler, Pampa.Common"/&gt;
	&lt;add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/&gt;
&lt;/httpHandlers>
</pre>		    

    <br/>
    <br/>

    <span class="subtitle">IIS</span>
    <br/>
    <br/>
    If you try to host an application using Pampa.Net in an IIS Server you need to configure the
    site to allow ASP.Net to manage calls for js, css, gif and png files inside Pampa.
    <br/>
    <br/>

    <span class="subsubtitle">IIS 6</span>
    <br/>
    <br/>    
    Go to "site properties -> configuration... -> assignments" and add all these extensions: *.js, *.css, *.gif, *.png
    pointing to ASP.Net dll (in my machine: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll).
    <br/>
    <br/>    
    
    <span class="subsubtitle">IIS 7</span>
    <br/>
    <br/>    
    First of all change the Application Pool to a Classic .Net AppPool. Then, go to "Handler Mappings" section and add all extensions via "Add Module Mapping".<br />
    For example, for gif files add Path = "Pampa.*/*.gif", Module = IsapiModule and the executable file should be the ASP.Net dll.
    Notice that in this case it is necesary to add the full path "Pampa.*/*.gif" and not just "*.gif".
    <br/>
    <br/>
    <br/>
    
    <span class="subtitle">External Resources</span>
    <br/>
    <br/>
    If you can not set the above configuration for any reason there is the possibility to copy all
    resources in your site and configuring Pampa.Net to get the resources from there.
    To do that just write set the resource path in the web.config:
    
<pre class="codeBlock">
&lt;configSections&gt;
    &lt;section name="pampa" type="System.Configuration.NameValueFileSectionHandler"/&gt;
    ...
&lt;/configSections&gt;
&lt;pampa&gt;
    &lt;add key="resources.path" value="Resources"/&gt;
    ...
&lt;/pampa&gt;
</pre>		    

    <br/>
    <br/>
        
    <span class="subtitle">Common Resources</span>
    <br/>
    <br/>
    Here are a couple of styles and images built inside Pampa.Common
    that you could want to you use in your site.
    <br/>
    <br/>
    
    <span class="subsubtitle">Images</span>
    <br/>
    <br/>    
    <a href="../../Resources/Pampa.Common/close.gif">Pampa.Common/close.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/close_on.gif">Pampa.Common/close_on.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/collapse_down.gif">Pampa.Common/collapse_down.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/collapse_up.gif">Pampa.Common/collapse_up.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/config.gif">Pampa.Common/config.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/delete.gif">Pampa.Common/delete.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/edit.gif">Pampa.Common/edit.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/filters.gif">Pampa.Common/filters.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/load.gif">Pampa.Common/load.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/magnifier.gif">Pampa.Common/magnifier.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/new.gif">Pampa.Common/new.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/save.gif">Pampa.Common/save.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/trash.gif">Pampa.Common/trash.gif</a><br/>   
    <a href="../../Resources/Pampa.Common/trash2.png">Pampa.Common/trash2.png</a><br/>   
    <br/>
    <br/>    

    <span class="subsubtitle">Styles</span>
    <br/>
    <br/>  
    <a href="../../Resources/Pampa.Common/Ice.css">Pampa.Common/Ice.css</a><br/>   
    <a href="../../Resources/Pampa.Common/DefaultLayout.css">Pampa.Common/DefaultLayout.css</a><br/>   
    <br/>
    <br/> 
   

    </div>
    </form>
</body>
</html>
